<<#if elementGenerator.isMultilayer(relation)>el-dialog ${elementGenerator.getDivVIf(relation)} width="80%"<#else>el-card</#if> ${elementGenerator.getSubAttrs(relation)} v-ab-permission:show="tablePermission.${relation.busObj.key}.${relation.tableKey}" >
    <div class="ab-form-title" <#if elementGenerator.isMultilayer(relation)>slot="title"<#else>slot="header"</#if> ><span class="title">${group.comment}</span>
        <ab-sub-add href="javascript:void(0)" class="el-button el-button--primary" v-model="${elementGenerator.getScopePath(relation)}" v-bind:init-data="initData.${relation.busObj.key}.${relation.tableKey}" v-ab-permission:edit="tablePermission.${relation.busObj.key}.${relation.tableKey}">添加 </ab-sub-add>
        <ab-sub-exp href="javascript:void(0)" class="el-button el-button--primary" v-model="${elementGenerator.getScopePath(relation)}" table-key="${relation.tableKey}" v-ab-permission:edit="tablePermission.${relation.busObj.key}.${relation.tableKey}">导出</ab-sub-exp>
        <ab-sub-imp href="javascript:void(0)" class="el-button el-button--primary" v-model="${elementGenerator.getScopePath(relation)}" table-key="${relation.tableKey}" v-ab-permission:edit="tablePermission.${relation.busObj.key}.${relation.tableKey}">导入</ab-sub-imp>
    </div>
    <ab-sub-scope v-slot="scope" :permissiona="permission" :table-permissiona="tablePermission" v-for="(${relation.tableKey},index) in ${elementGenerator.getScopePath(relation)}" <#if elementGenerator.isMultilayer(relation)> class="el-form el-form-label-right" </#if> >
        ${getOne2ManyChild(relation)}
        <ab-sub-del  class="el-button el-button--error" v-model="${elementGenerator.getScopePath(relation)}" v-bind:index="index" v-ab-permission:edit="scope.tablePermission.${relation.busObj.key}.${relation.tableKey}">移除</ab-sub-del>
        <div class="el-row">
            <#list group.columnList as groupColumn>
                <div class="el-col el-col-${24/groupColumn.row} el-form-item" v-ab-permission:show="scope.permission.${relation.busObj.key}.${groupColumn.tableKey}.${groupColumn.key}">
                    <label class="el-form-item__label" style="width: 150px;">${groupColumn.comment}：</label>
                    <div class="el-form-item__content" style="margin-left: 150px;">${elementGenerator.getColumn(group,groupColumn)}</div>
                </div>
            </#list>
        </div>
    </ab-sub-scope><#if elementGenerator.isMultilayer(relation)>
    <span slot="footer" class="dialog-footer">
        <el-button @click="subTempData.${relation.busObj.key}_${relation.tableKey}_Model=false">取 消</el-button>
		<el-button type="primary" @click="subTempData.${relation.busObj.key}_${relation.tableKey}_okFn()">确 定</el-button>
    </span></#if>
    </<#if elementGenerator.isMultilayer(relation)>el-dialog<#else>el-card</#if>>

    <#function getOne2ManyChild relation>
        <#assign relationList = relation.getChildren('oneToMany')>
        <#assign rtn>
            <#if relationList?? && (relationList?size > 0) >
                <#list relationList as relation>
                    <ab-sub-detail v-bind:sub-temp-data.sync="subTempData" pkey="${relation.parent.tableKey}" class="el-button el-button--default"  v-model="${elementGenerator.getScopePath(relation.parent)}<#if relation.parent.type =='oneToMany'>[index]</#if>" table-key="${relation.getBusObj().getKey()}_${relation.tableKey}" v-ab-permission:show="scope.tablePermission.${relation.busObj.key}.${relation.tableKey}" >${relation.tableComment}详情</ab-sub-detail>
                </#list>
            </#if>
        </#assign>
        <#return rtn>
    </#function>
